#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include "imgMouseEvents.h"
#include "ImgBasicProcessing.h"
#include "ImgDivision.h"
#include "ImgMorphology.h"
#include "ImgFcn.h"

#include <QPushButton>
#include <QFileDialog>
#include <QMessageBox>
#include <QGraphicsView>
#include <QAction>
#include <QMenu>
#include <QToolBar>
#include <QLabel>
#include <QSlider>
#include <QVector>
#include <QDebug>

#include <QtCharts/QChart>
#include <QtCharts/QBarSet>
#include <QtCharts/QBarSeries>
#include <QtCharts/QBarCategoryAxis>
#include <QtCharts/QChartView>

#include <iostream>
#include <stdlib.h>
#include <stdio.h>
#include <algorithm>
using namespace std;
using namespace QtCharts;

namespace Ui {
class MainWindow;
}

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    explicit MainWindow(QWidget *parent = nullptr);
    ~MainWindow();
    void recvShowPicSignal(QImage*image, QGraphicsView *graphicsView);//接收并显示图片的函数
    void setToolBar();

private:
    Ui::MainWindow *ui;
    QImage *m_ImgOriginal;
    QImage *m_Img;//处理过程的图像 左边的
    QImage *m_ImgSave;//保存的图像
    //QLabel *m_SliderLabel;
    ImgMouseEvents  *m_ImgMouseEvents;
    ImgBasicProcessing   *m_ImgBasicProcessing;
    ImgDivision *m_ImgDivision;
    ImgMorphology *m_ImgMorphology;
    ImgFcn *m_ImgFcn;

    QSlider *slider_InToolBar;

    QString m_ActionName = " ";

    vector<int> m_Seed = {0,0};
private slots:
    void OpenImg();
    void BasicProcessing();
    //void ShowSliderValue();
    void Division();
    void AllProcessing(int delta);
    void Morphology();
    void drawBarGraph();

    //左右两个窗口移动
    void ImgChanged();
    void ImgChangedToR();
    //滑动条选取种子点
    void getSliderSeed();
};

#endif // MAINWINDOW_
